/**
 * user模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from '@/utils/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块

const user = {
       
    userlogin(params: any) {
        return axios.post(`${base.user}/userlogin`, qs.stringify(params));
    },
    signOut() {
        return axios.get(`${base.user}/signOut`);
    },
    register(params: any) {
        return axios.post(`${base.user}/register`, qs.stringify(params));
    },
    addUser(params: any){
        return axios.post(`${base.user}/addUser`, qs.stringify(params));
    },
    getUserList(params: any){
        return axios.post(`${base.user}/getUserList`, qs.stringify(params));
    },
    editUser(params: any){
        return axios.post(`${base.user}/editUser`, qs.stringify(params));
    },
    deleteUser(id: any){
        return axios.delete(`${base.user}/deleteUser/${id}`);
    },
    deleteUserByIds(params: any){
        return axios.post(`${base.user}/deleteUserByIds`, {ids:params});
    },

}

export default user;